<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="/js/spritejs.js"></script>
  <script src="//lib.baomitu.com/dat-gui/0.7.2/dat.gui.min.js"></script>
  <style>
    #adaptive {
      width: 100%;
      padding-bottom: 50%;
      background: #eee;
    }
  </style>
</head>
<body>
  <div id="adaptive"></div>
  <script>
    const {Scene, Arc, Ellipse} = spritejs;
    const container = document.getElementById('adaptive');
    const scene = new Scene({
      container,
      width: 1200,
      height: 600,
      // contextType: '2d',
    });
    const layer = scene.layer();

    const fan = new Arc({
      pos: [300, 300],
      radius: 100,
      startAngle: 0,
      endAngle: 120,
      fillColor: 'blue',
    });
    layer.append(fan);

    const fan2 = fan.cloneNode();
    fan2.attr({
      pos: [300, 150],
      closeType: 'sector',
    });

    layer.append(fan2);

    const ellipse = new Ellipse({
      pos: [700, 300],
      radiusX: 150,
      radiusY: 100,
      startAngle: 0,
      endAngle: 240,
      lineWidth: 6,
      strokeColor: 'red',
      fillColor: 'green',
      closeType: 'sector',
    });
    layer.append(ellipse);
  </script>
</body>
</html>
